package c.x.jy.dao.model;

import lombok.Data;

import java.util.List;

@Data
public class OrderForm {

    private Long    teacherId;     //大师ID
    private Integer serviceType;   //订单服务类型 1-咨询订单，2-闪测订单，3-提问订单，4-充值订单，5-会员认证
    private Long    couponId;    //券ID
    private Long    couponTransId;
    private Integer integralCount; //积分
    private Long    vipTransId;//会员卡ID



    private List<OrderItem> itemList;



    public enum orderType{
        /**
         * 咨询
         */
        consult("咨询订单",1),
        /**
         * 闪测订单
         */
        quick("闪测订单",2),
        /**
         * 提问订单
         */
        ask("提问订单",3),
        /**
         * 充值订单
         *
         */
        recharge("充值订单",4),
        /**
         * 会员认证订单
         */
        member_cert("会员认证",5); 
        private Integer type;
        private String name;
        private  orderType(String name,Integer type){
            this.type=type;
            this.name=name;
        }
        public static String getName(Integer type){
            switch(type) {
                case 1:
                  return orderType.consult.getName();
                case 2:
                    return orderType.quick.getName();
                case 3:
                    return orderType.ask.getName();
                case 4:
                    return orderType.recharge.getName();
                case 5:
                    return orderType.member_cert.getName();
            }
            return null;
            }

        public Integer getType() {
            return type;
        }



        public String getName() {
            return name;
        }


    }
}
